import { reqJson } from './requestWithToken';
import domain from '@/utils/domain';

export async function page(params) {
  const url = `${domain.user}/client/page`;
  return reqJson.get(url, params);
}

export async function list() {
  const url = `${domain.user}/client/list`;
  return reqJson.get(url);
}

export async function update(params) {
  const url = `${domain.user}/client/update`;
  return reqJson.postJson(url, params);
}

export async function remove(clientId) {
  const url = `${domain.user}/client/remove/${clientId}`;
  return reqJson.post(url);
}
